/*
    班级管理
*/
const { model, Sequelize } = require('../../core/model.js');

// const { papersModel } = require('./papers')



const classesModel = model.define('classes', {
    class_name: {
        type: Sequelize.STRING(100),
        unique: 'class_nameUq',
    },
    status: {
        type: Sequelize.ENUM('1', '0'),
    },
    ctime: Sequelize.DATE,
    mtime: Sequelize.DATE,
}, {
        createdAt: 'ctime',
        updatedAt: 'mtime',
    })

classesModel.sync({
    // force: true 
})

module.exports = {
    classesModel,
    model,
    Op: Sequelize.Op
};
